<?php
/**
 * @name : articlepoint.php
 * @date : 2015-01-19
 */
namespace haibao\cms\business;
use haibao\cms\data\ArticlePoint as ArticlePointData;
class ArticlePoint extends \haibao\cms\business\Base{
    
    
    /**
     * 获取文章看点
     * @param Object \haibao\cms\model\filter\ArticlePoint 
     */
	public function getArticlePoint($filter){
		
		$articlePointData = new ArticlePointData();
		return $articlePointData->getAll($filter);
	}
    /**
     * 添加文章看点
     * @param : Array \haibao\cms\model\data\ArticlePoint 
     * @param : Int $articleId
     */
	public function saveArticlePoint($articlePointModels,$articleId){
		
		if(!$articleId){
			throw new \Exception('文章ID为空',self::DATA_EMPTY_NAME);
		}
		$articlePointData = new ArticlePointData();
		
		$articlePointData->saveArticlePoint($articlePointModels,$articleId);
		self::saveOperateHistory(self::DATA_ERROR_ARTICLE_POINT_ADD, array($articleId));
	}
}